*Replication code for "State First? A Disaggregation and Empirical Investigation", by David Andersen and Jonathan Doucette, in British Journal of Political Science*
*Load 'Andersen and Doucette replication data.dta'

xtset country_id year

****Main models****
****           ****
**Table 3**
reg break terr_trans if sample==1, cluster(country_id)
areg break terr_trans i.region col brit  if sample==1, cluster(country_id) absorb(year)
areg break terr_trans i.region col brit  gdp_trans oil_trans if sample==1, cluster(country_id) absorb(year)
reg break bq_trans if sample==1, cluster(country_id)
areg break bq_trans i.region col brit  if sample==1, cluster(country_id) absorb(year)
areg break bq_trans i.region col brit  gdp_trans oil_trans if sample==1, cluster(country_id) absorb(year)
areg break terr_trans bq_trans i.region  col brit gdp_trans oil_trans if sample==1, cluster(country_id) absorb(year)

**Table 4**
reg break l.terr_change if sample3==1, cluster(country_id)
areg break l.terr_change i.year  if sample3==1, cluster(country_id) absorb(country_id)
areg break l.terr_change i.year  l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if sample3==1, cluster(country_id) absorb(country_id)
reg break l.bq_change if sample3==1, cluster(country_id)
areg break l.bq_change i.year  if sample3==1, cluster(country_id) absorb(country_id)
areg break l.bq_change i.year  l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if sample3==1, cluster(country_id) absorb(country_id)
areg break l.terr_change l.bq_change  i.year l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if sample3==1, cluster(country_id) absorb(country_id)

**Table 5**
reg polychange terr_trans  if samplech==1, cluster(country_id)
areg polychange terr_trans  i.region col brit  if samplech==1, cluster(country_id) absorb(year)
areg polychange terr_trans spellpo i.region col brit  gdp_trans oil_trans if samplech==1, cluster(country_id) absorb(year)
reg polychange bq_trans  if samplech==1, cluster(country_id)
areg polychange bq_trans  i.region col brit if samplech==1, cluster(country_id) absorb(year)
areg polychange bq_trans spellpo i.region col brit  gdp_trans oil_trans if samplech==1, cluster(country_id) absorb(year)
areg polychange terr_trans spellpo bq_trans i.region  col brit gdp_trans oil_trans if samplech==1, cluster(country_id) absorb(year)
 
**Table 6**
reg polychange l.terr_change  if samplech==1, cluster(country_id)
areg polychange l.terr_change i.year   if samplech==1, cluster(country_id) absorb(country_id)
areg polychange l.terr_change i.year l2.polych  l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if sample==1 , cluster(country_id) absorb(country_id)
reg polychange l.bq_change if samplech==1, cluster(country_id)
areg polychange l.bq_change i.year  if samplech==1, cluster(country_id) absorb(country_id)
areg polychange l.bq_change i.year l2.polych  l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if samplech==1 & l.terr_ch!=., cluster(country_id) absorb(country_id)
areg polychange l.terr_change l.bq_change  l2.polych i.year l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if samplech==1, cluster(country_id) absorb(country_id)

*****Appendix*****
*****        *****
*Alt. measures of X*
areg break fiscap_trans i.region col brit if sample==1, cluster(country_id) absorb(year)
areg polyc fiscap_trans i.region col brit if sample==1, cluster(country_id) absorb(year)
areg break fiscap_ch i.year  if samplec==1, cluster(country_id) absorb(country_id)
areg polyc fiscap_ch i.year  if samplec==1, cluster(country_id) absorb(country_id)
areg break pubcorr_trans i.region col brit if sample==1, cluster(country_id) absorb(year)
areg polyc pubcorr_trans i.region col brit if sample==1, cluster(country_id) absorb(year)
areg break pubcorr_ch i.year  if samplec==1, cluster(country_id) absorb(country_id)
areg polyc pubcorr_ch i.year  if samplec==1, cluster(country_id) absorb(country_id)

*Figure A1*
hist bq_trans if sample==1 | samplech==1, xtitle("Bureaucratic quality at transition") title("")
hist terr_trans if sample==1 | samplech==1, xtitle("State capacity at transition") title("")
hist bq_change if sample==1 | samplech==1, xtitle("Changes in bureaucratic quality since transition") title("")
hist terr_change if sample==1 | samplech==1, xtitle("Changes in state capacity since transition") title("")

*Figure A2*
qui gen cap=v2svstterr/100 
qui gen qual=v2clrspct
sum qual
replace qual=(qual - `r(min)') / (`r(max)'-`r(min)')
bys year: egen meancapacity=mean(cap) if sample==1
bys year: egen meanquality=mean(qual) if sample==1
tw (line meancap year) (line meanq year) if sample==1 & year>1849 


*Table A1*
sum break polychange terr_trans terr_change bq_trans bq_change spellpo col brit gdp growth gdp_trans oil oil_trans regionaldem demstock cwar war if sample==1

*Table A2*
sort country_id year
xtset country_id year
logit break terr_trans i.region col brit  year y2  if sample==1, cluster(country_id)
clogit break lagter  year y2  if sample==1, group(country_id) cluster(country_id)
logit break bq_trans i.region col brit  year y2  if sample==1, cluster(country_id)
clogit break lagbq  year y2 if sample==1, group(country_id) cluster(country_id)

*Figure A3*
qui areg break terr_trans i.region col brit  if sample==1 & region!=0, cluster(country_id) absorb(year)
eststo m1: qui margins, dydx(terr) post
qui areg break terr_trans i.region col brit  if sample==1 & region!=1, cluster(country_id) absorb(year)
eststo m2: qui margins, dydx(terr) post
qui areg break terr_trans i.region col brit  if sample==1 & region!=2, cluster(country_id) absorb(year)
eststo m3: qui margins, dydx(terr) post
qui areg break terr_trans i.region col brit  if sample==1 & region!=3, cluster(country_id) absorb(year)
eststo m4: qui margins, dydx(terr) post
qui areg break terr_trans i.region col brit  if sample==1 & region!=4, cluster(country_id) absorb(year)
eststo m5: qui margins, dydx(terr) post
coefplot (m1, label(Excluding Europe)) (m2, label(Excluding Africa)) (m3, label(Excludng Asia)) (m4, label(Exlucding Americas)) (m5, label(Excluding Oceania and Carribean)), vertical yline(0) xtitle("")  title("Coefficient for state capacity at transition")
qui areg break bq_trans i.region col brit if sample==1 & region!=0, cluster(country_id) absorb(year)
eststo m1: qui margins, dydx(bq) post
qui areg break bq_trans i.region col brit  if sample==1 & region!=1, cluster(country_id) absorb(year)
eststo m2: qui margins, dydx(bq) post
qui areg break bq_trans i.region col brit  if sample==1 & region!=2, cluster(country_id) absorb(year)
eststo m3: qui margins, dydx(bq) post
qui areg break bq_trans i.region col brit  if sample==1 & region!=3, cluster(country_id) absorb(year)
eststo m4: qui margins, dydx(bq) post
qui areg break bq_trans i.region col brit  if sample==1 & region!=4, cluster(country_id) absorb(year)
eststo m5: qui margins, dydx(bq) post
coefplot (m1, label(Excluding Europe)) (m2, label(Excluding Africa)) (m3, label(Excludng Asia)) (m4, label(Exlucding Americas)) (m5, label(Excluding Oceania and Carribean)), vertical xtitle("")  title("Coefficient for bureaucratic quality at transition")

*Figure A4*
qui areg break l.terr_change i.country_id if sample==1 & region!=0, cluster(country_id) absorb(year)
eststo m1: qui margins, dydx(l.terr) post
qui areg break l.terr_change i.country_id if sample==1 & region!=1, cluster(country_id) absorb(year)
eststo m2: qui margins, dydx(l.terr) post
qui areg break l.terr_change i.country_id if sample==1 & region!=2, cluster(country_id) absorb(year)
eststo m3: qui margins, dydx(l.terr) post
qui areg break l.terr_change i.country_id if sample==1 & region!=3, cluster(country_id) absorb(year)
eststo m4: qui margins, dydx(l.terr) post
qui areg break l.terr_change i.country_id if sample==1 & region!=4, cluster(country_id) absorb(year)
eststo m5: qui margins, dydx(l.terr) post
coefplot (m1, label(Excluding Europe)) (m2, label(Excluding Africa)) (m3, label(Excludng Asia)) (m4, label(Exlucding Americas)) (m5, label(Excluding Oceania and Carribean)), vertical yline(0) xtitle("")  title("Coefficient for capacity changes since transition")

qui xtreg break l.bq_change i.year if sample==1 & region!=0, cluster(country_id) fe
eststo m1: qui margins, dydx(l.bq) post
qui xtreg break l.bq_change i.year if sample==1 & region!=1, cluster(country_id) fe
eststo m2: qui margins, dydx(l.bq) post
qui xtreg break l.bq_change i.year if sample==1 & region!=2, cluster(country_id) fe
eststo m3: qui margins, dydx(l.bq) post
qui xtreg break l.bq_change i.year if sample==1 & region!=3, cluster(country_id) fe
eststo m4: qui margins, dydx(l.bq) post
qui xtreg break l.bq_change i.year if sample==1 & region!=4, cluster(country_id) fe
eststo m5: qui margins, dydx(l.bq) post
coefplot (m1, label(Excluding Europe)) (m2, label(Excluding Africa)) (m3, label(Excludng Asia)) (m4, label(Exlucding Americas)) (m5, label(Excluding Oceania and Carribean)), vertical yline(0) xtitle("")  title("Coefficient for quality changes since transition")

*Table A3*
reg break c.terr_tr##c.bq_trans if sample==1, cluster(country_id)
areg break c.terr_tr##c.bq_trans col brit  i.region if sample==1, cluster(country_id) absorb(year)
areg break c.terr_tr##c.bq_trans col brit i.region  gdp_trans oil_trans if sample==1, cluster(country_id) absorb(year)
reg break c.l.terr_change##c.l.bq_ch if sample==1, cluster(country_id)
areg break c.l.terr_change##c.l.bq_ch i.year  if sample==1, cluster(country_id) absorb(country_id)
areg break c.l.terr_change##c.l.bq_ch i.year  l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if sample==1, cluster(country_id) absorb(country_id)

*Figure A5*
qui areg lied_break terr_tr i.region brit col  if sample2==1, cluster(country_id) absorb(year)
eststo m1: qui margins, dydx(terr) post
qui areg lied_break bq_tr i.region brit col  if sample2==1, cluster(country_id) absorb(year)
eststo m2: qui margins, dydx(bq) post
qui areg lied_break c.l.terr_change i.year  if sample2==1, cluster(country_id) absorb(country_id)
eststo m3: qui margins, dydx(l.terr) post
qui areg lied_break c.l.bq_change i.year  if sample2==1, cluster(country_id) absorb(country_id)
eststo m4: qui margins, dydx(l.bq) post
coefplot (m1, label(Capacity at transition)) (m2, label(Quality at transition)) (m3, label(Changes in capacity)) (m4, label(Changes in quality)), vertical yline(0) ytitle("Marginal effect of state measure") title("") xtitle("")

*Figure A6*
qui areg break bq_trans i.region col brit if sample==1, cluster(country_id) absorb(year)
qui margins, at(bq=(0.510 (0.05) 0.742)) 
marginsplot, recast(line) recastci(rarea) xtitle("Quality at transition") ytitle("Predicted probability of democratic breakdown") scheme(s1mono) title("") 

qui xtreg break l.bq_change i.year  if sample==1, cluster(country_id) fe
qui margins, at(l.bq=(0 (0.02) 0.111)) 
marginsplot, recast(line) recastci(rarea) xtitle("Change in quality since transition") ytitle("Predicted probability of democratic breakdown") scheme(s1mono) title("") 

*Figure A7*
qui areg polych terr_trans i.region col brit  if samplec==1 & region!=0, cluster(country_id) absorb(year)
eststo m1: qui margins, dydx(terr) post
qui areg polych terr_trans i.region col brit  if samplec==1 & region!=1, cluster(country_id) absorb(year)
eststo m2: qui margins, dydx(terr) post
qui areg polych terr_trans i.region col brit  if samplec==1 & region!=2, cluster(country_id) absorb(year)
eststo m3: qui margins, dydx(terr) post
qui areg polych terr_trans i.region col brit  if samplec==1 & region!=3, cluster(country_id) absorb(year)
eststo m4: qui margins, dydx(terr) post
qui areg polych terr_trans i.region col brit  if samplec==1 & region!=4, cluster(country_id) absorb(year)
eststo m5: qui margins, dydx(terr) post
coefplot (m1, label(Excluding Europe)) (m2, label(Excluding Africa)) (m3, label(Excludng Asia)) (m4, label(Exlucding Americas)) (m5, label(Excluding Oceania and Carribean)), vertical yline(0) xtitle("")  title("Coefficient for state capacity at transition")
qui areg polych bq_trans i.region col brit  if samplec==1 & region!=0, cluster(country_id) absorb(year)
eststo m1: qui margins, dydx(bq) post
qui areg polych bq_trans i.region col brit  if samplec==1 & region!=1, cluster(country_id) absorb(year)
eststo m2: qui margins, dydx(bq) post
qui areg polych bq_trans i.region col brit  if samplec==1 & region!=2, cluster(country_id) absorb(year)
eststo m3: qui margins, dydx(bq) post
qui areg polych bq_trans i.region col brit  if samplec==1 & region!=3, cluster(country_id) absorb(year)
eststo m4: qui margins, dydx(bq) post
qui areg polych bq_trans i.region col brit  if samplec==1 & region!=4, cluster(country_id) absorb(year)
eststo m5: qui margins, dydx(bq) post
coefplot (m1, label(Excluding Europe)) (m2, label(Excluding Africa)) (m3, label(Excludng Asia)) (m4, label(Exlucding Americas)) (m5, label(Excluding Oceania and Carribean)), vertical yline(0) xtitle("")  title("Coefficient for bureaucratic quality at transition")

*Figure A8*
qui xtreg polych l.terr_change  i.year if samplec==1 & region!=0, cluster(country_id) fe
eststo m1: qui margins, dydx(l.terr) post
qui xtreg polych l.terr_change  i.year if samplec==1 & region!=1, cluster(country_id) fe
eststo m2: qui margins, dydx(l.terr) post
qui xtreg polych l.terr_change  i.year if samplec==1 & region!=2, cluster(country_id) fe
eststo m3: qui margins, dydx(l.terr) post
qui xtreg polych l.terr_change i.year  if samplec==1 & region!=3, cluster(country_id) fe
eststo m4: qui margins, dydx(l.terr) post
qui xtreg polych l.terr_change i.year  if samplec==1 & region!=4, cluster(country_id) fe
eststo m5: qui margins, dydx(l.terr) post
coefplot (m1, label(Excluding Europe)) (m2, label(Excluding Africa)) (m3, label(Excludng Asia)) (m4, label(Exlucding Americas)) (m5, label(Excluding Oceania and Carribean)), vertical yline(0) xtitle("")  title("Coefficient for capacity changes since transition")

qui xtreg polych l.bq_change i.year  if samplec==1 & region!=0, cluster(country_id) fe
eststo m1: qui margins, dydx(l.bq) post
qui xtreg polych l.bq_change i.year  if samplec==1 & region!=1, cluster(country_id) fe
eststo m2: qui margins, dydx(l.bq) post
qui xtreg polych l.bq_change i.year  if samplec==1 & region!=2, cluster(country_id) fe
eststo m3: qui margins, dydx(l.bq) post
qui xtreg polych l.bq_change i.year  if samplec==1 & region!=3, cluster(country_id) fe
eststo m4: qui margins, dydx(l.bq) post
qui xtreg polych l.bq_change i.year  if samplec==1 & region!=4, cluster(country_id) fe
eststo m5: qui margins, dydx(l.bq) post
coefplot (m1, label(Excluding Europe)) (m2, label(Excluding Africa)) (m3, label(Excludng Asia)) (m4, label(Exlucding Americas)) (m5, label(Excluding Oceania and Carribean)), vertical xtitle("")  title("Coefficient for quality changes since transition")

*Table A4*
reg polychange c.terr_trans##c.bq_t  if samplech==1, cluster(country_id)
areg polychange c.terr_trans##c.bq_t  i.region col brit  if samplech==1, cluster(country_id) absorb(year)
areg polychange c.terr_trans##c.bq_t spellpo i.region col brit  gdp_trans oil_trans if samplech==1, cluster(country_id) absorb(year)
reg polychange c.l.terr_change##c.l.bq_ch  if samplech==1, cluster(country_id)
areg polychange c.l.terr_change##c.l.bq_ch i.year   if samplech==1, cluster(country_id) absorb(country_id)
areg polychange c.l.terr_change##c.l.bq_ch i.year l2.polych  l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if sample==1 , cluster(country_id) absorb(country_id)

*Table A5*
areg pos terr_trans  i.region col brit  if samplech==1, cluster(country_id) absorb(year)
areg pos terr_trans spellpo i.region col brit  gdp_trans oil_trans if samplech==1, cluster(country_id) absorb(year)
areg pos bq_trans  i.region col brit if samplech==1, cluster(country_id) absorb(year)
areg pos bq_trans spellpo i.region col brit  gdp_trans oil_trans if samplech==1, cluster(country_id) absorb(year)
areg neg terr_trans  i.region col brit  if samplech==1, cluster(country_id) absorb(year)
areg neg terr_trans spellpo i.region col brit  gdp_trans oil_trans if samplech==1, cluster(country_id) absorb(year)
areg neg bq_trans  i.region col brit if samplech==1, cluster(country_id) absorb(year)
areg neg bq_trans spellpo i.region col brit  gdp_trans oil_trans if samplech==1, cluster(country_id) absorb(year)
 
*Table A6*
areg pos l.terr_change i.year   if samplech==1, cluster(country_id) absorb(country_id)
areg pos l.terr_change i.year l2.polych  l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if sample==1 , cluster(country_id) absorb(country_id)
areg pos l.bq_change i.year  if samplech==1, cluster(country_id) absorb(country_id)
areg pos l.bq_change i.year   l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if samplech==1, cluster(country_id) absorb(country_id)
areg neg l.terr_change i.year   if samplech==1, cluster(country_id) absorb(country_id)
areg neg l.terr_change i.year l2.polych  l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if sample==1 , cluster(country_id) absorb(country_id)
areg neg l.bq_change i.year  if samplech==1, cluster(country_id) absorb(country_id)
areg neg l.bq_change i.year   l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if samplech==1, cluster(country_id) absorb(country_id)

*Table A7*
ivregress 2sls break  i.region y y2 brit col  (bq_tra= v75_grp2 v75_grp3 v75_grp4 v75_grp5 v75_grp6) if sample==1, cluster(country_id)
estat first
ivregress 2sls polyc  i.region y y2 brit col  (bq_tra= v75_grp2 v75_grp3 v75_grp4 v75_grp5 v75_grp6) if sample==1, cluster(country_id)
estat first
ivregress 2sls break i.region y y2  col brit (terr_trans= v95_grp* ) if sample==1, cluster(country_id)
estat first
ivregress 2sls polyc i.region y y2  col brit (terr_trans= v95_grp* ) if sample==1, cluster(country_id)
estat first
ivregress 2sls break  i.region y y2 brit col oil_tr gdp_tr (bq_tra= v75_grp2 v75_grp3 v75_grp4 v75_grp5 v75_grp6) if sample==1, cluster(country_id)
estat first
ivregress 2sls polyc  i.region y y2 brit col oil_tr gdp_tr (bq_tra= v75_grp2 v75_grp3 v75_grp4 v75_grp5 v75_grp6) if sample==1, cluster(country_id)
estat first
ivregress 2sls break i.region y y2 gdp_tr oil_tr col brit (terr_trans= v95_grp* ) if sample==1, cluster(country_id)
estat first
ivregress 2sls polyc i.region y y2 gdp_tr oil_tr col brit (terr_trans= v95_grp* ) if sample==1, cluster(country_id)
estat first

 *Table A8*
reg break terr_trans dyear dy2 dy3 if sample==1, cluster(country_id)
areg break terr_trans i.region col brit dyear dy2 dy3 if sample==1, cluster(country_id) absorb(year)
areg break terr_trans i.region col brit dyear dy2 dy3 gdp_trans oil_trans if sample==1, cluster(country_id) absorb(year)
reg break bq_trans dyear dy2 dy3 if sample==1, cluster(country_id)
areg break bq_trans i.region col brit dyear dy2 dy3 if sample==1, cluster(country_id) absorb(year)
areg break bq_trans i.region col brit dyear dy2 dy3 gdp_trans oil_trans if sample==1, cluster(country_id) absorb(year)
areg break terr_trans bq_trans i.region dyear dy2 dy3 col brit gdp_trans oil_trans if sample==1, cluster(country_id) absorb(year)

 *Table A9*
reg break l.terr_change dyear dy2 dy3 if samp4==1, cluster(country_id)
areg break l.terr_change i.year  dyear dy2 dy3 if samp4==1, cluster(country_id) absorb(country_id)
areg break l.terr_change i.year  l2.gdp l2.oil dyear dy2 dy3 l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if samp4==1, cluster(country_id) absorb(country_id)
reg break l.bq_change dyear dy2 dy3 if samp4==1, cluster(country_id)
areg break l.bq_change i.year dyear dy2 dy3 if samp4==1, cluster(country_id) absorb(country_id)
areg break l.bq_change i.year  l2.gdp dyear dy2 dy3 l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if samp4==1, cluster(country_id) absorb(country_id)
areg break l.terr_change l.bq_change  i.year l2.gdp dyear dy2 dy3 l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if samp4==1, cluster(country_id) absorb(country_id)

*Table A11*
areg break l.v2svstterr i.year  if sample==1, cluster(country_id) absorb(country_id)  
areg break l.v2svstterr i.year  l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if sample==1, cluster(country_id) absorb(country_id)    
areg break l.v2clrspct i.year  if sample==1, cluster(country_id) absorb(country_id)   
areg break l.v2clrspct i.year  l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if sample==1, cluster(country_id) absorb(country_id)   
areg polyc l.v2svstterr i.year  if samp4==1, cluster(country_id) absorb(country_id)    
areg polyc l.v2svstterr i.year l2.polych l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if samp4==1, cluster(country_id) absorb(country_id)   
areg polyc l.v2clrspct i.year  if samp4==1, cluster(country_id) absorb(country_id)   
areg polyc l.v2clrspct i.year l2.polych l2.gdp l2.oil l2.demstock l2.regionaldem l2.war l2.cwar l2.growth if samp4==1, cluster(country_id) absorb(country_id)

*Table A10 and Figure A9*
*Load 'Andersen and Doucette replication data survival.dta'
stset timeatrisk,failure(failure)

stcox terr_trans i.region col brit  , shared(country_id)
stcox terr_trans i.region col brit  gdp_tr oil_tr, 
stcurve, survival at1(terr_trans=0.84)  at2(terr_trans=0.98) range(0 100)
stcox bq_trans i.region col brit  , shared(country_id) 
stcox bq_trans i.region col brit gdp_tr oil_tr , 
stcurve, survival at1(bq_trans=0.43)  at2(bq_trans=0.65) range(0 100)


*Table A11*
*Load 'Andersen and Doucette replication data 10 year panel.dta'
xtset country_id period
xtreg polyc l.v2svst  i.decade if samp==1, cluster(country_id) fe
xtreg polyc l.v2clrsp  i.decade if samp==1, cluster(country_id) fe
xtabond2 F.polyc v2clrspct polyc i.decade if samp==1,gmm(polyc v2clrspct, lag( 2 2)) iv(i.decade) robust
xtabond2 F.polyc v2svstterr polyc i.decade if samp==1,gmm(polyc v2svstterr, lag( 2 2)) iv(i.decade) robust

